package com.jsoft.jsofted.platform.service;

import com.jsoft.jsofted.framework.service.impl.CocServiceImpl;
import com.jsoft.jsofted.platform.entity.RolePermEntity;
import com.jsoft.jsofted.platform.entity.TenantRoleEntity;
import com.jsoft.jsofted.platform.entity.UploadCategoryEntity;
import com.jsoft.jsofted.platform.mapper.RolePermMapper;
import com.jsoft.jsofted.platform.mapper.TenantRoleMapper;
import com.jsoft.jsofted.platform.mapper.UploadCategoryMapper;
import com.jsoft.jsofted.platform.service.impl.DicServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

@Configuration
public class PlatformCrudServices {

    @Bean("dicService")
    @Lazy
    public DicServiceImpl dicService() {
        return new DicServiceImpl();
    }

    @Bean("rolePermService")
    @Lazy
    public CocServiceImpl rolePermService() {
        return new CocServiceImpl<RolePermMapper, RolePermEntity>() {
        };
    }

    @Bean("tenantRoleService")
    @Lazy
    public CocServiceImpl tenantRoleService() {
        return new CocServiceImpl<TenantRoleMapper, TenantRoleEntity>() {
        };
    }

    @Bean("uploadCategoryService")
    @Lazy
    public CocServiceImpl uploadCategoryService() {
        return new CocServiceImpl<UploadCategoryMapper, UploadCategoryEntity>() {
        };
    }

}
